package model

import (
	"gorm.io/gorm"
	"time"
)

type Coll struct {
	Id         uint32         `gorm:"column:id;type:int(10) UNSIGNED;primaryKey;not null;" json:"id"`
	CreateTime time.Time      `gorm:"column:create_time;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"create_time"`
	UpdateTime time.Time      `gorm:"column:update_time;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"update_time"`
	DeleteTime gorm.DeletedAt `gorm:"column:delete_time;type:datetime(3);default:NULL;" json:"delete_time"`
	GoodsId    int32          `gorm:"column:goods_id;type:int(11);comment:商品id;default:NULL;" json:"goods_id"` // 商品id
	UserId     int32          `gorm:"column:user_id;type:int(11);comment:用户id;default:NULL;" json:"user_id"`   // 用户id
}

func (Coll) TableName() string {
	return "coll"
}
